package PTA2.ti60;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] A = new int[2500];
        A[0] = 1;
        int length = 1;
        for (int i = 2; i <= n; i++) {
            int carry = 0;
            for (int j = 0; j < length; j++) {
                int product = A[j] * i + carry;
                A[j] = product % 10;
                carry = product / 10;
            }
            while (carry > 0) {
                A[length++] = carry % 10;
                carry /= 10;
            }
        }
        for (int i = length - 1; i >= 0; i--) {
            System.out.print(A[i]);
        }
    }
}